package com.otp.util;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

/**
 * Created by Administrator on 2016/1/1.
 */
public class HttpUtil {

    public static String getURL(String URL) {
        String baseUrl = null;
        try {
            Properties properties = new Properties();
            properties.load(HttpUtil.class.getResourceAsStream(Constants.APP_SETTING));
            baseUrl = properties.get(Constants.BASE_URL).toString();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(baseUrl);
        stringBuilder.append(URL);
        return stringBuilder.toString();
    }

}
